package wx.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import wx.utils.HttpClientUtil;

@Component
public class FixedUpdatecount {
    private Logger logger = LoggerFactory.getLogger(getClass());
    private int i;

    @Scheduled(cron = "0 0 0 * * ?")
    public void execute() {
        logger.info("thread id:{},FixedPrintTask execute times:{}", ++i);
        HttpClientUtil.doGet("http://localhost:8080/details/updatecount");

    }

}
